package com.heima.api;

import com.heima.model.article.dtos.ApArticleDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leadnews-article")
public interface IArticleClient {

    @PostMapping("/api/v1/article/save")
    ResponseResult saveArticle(@RequestBody ApArticleDto articleDto);

    @GetMapping("/api/v1/article/get_article")
    ApArticle getArticle(@RequestParam Long id);
    @PostMapping("/api/v1/article/user/save")
    ResponseResult add(@RequestParam Integer userId,
                @RequestParam Integer wmUserId,
                @RequestParam String name);
}
